package apiday05homework;

import java.io.FileInputStream;
import java.io.IOException;

public class FisDemo {
    public static void main(String[] args) throws IOException {
        /*
        FileInputStream fis = new FileInputStream("fos1.dat");
        int d = fis.read();
        System.out.println(d);
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        fis.close();

         */
        FileInputStream fis = new FileInputStream("fos2.dat");
        int d = fis.read();
        System.out.println(d);
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        System.out.println("读取到的数据为："+fis.read());
        fis.close();
    }
}
